package com.lagou.order.feign;

import com.lagou.common.pojo.Goods;
import com.lagou.order.feign.fallback.OrderFeignFallback;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "lagou-service-goods", fallback = OrderFeignFallback.class)
public interface OrderFeign {

    @GetMapping("goods/getGoodsById/{id}")
    public Goods getGoodsById(@PathVariable("id") Integer id);
}
